package com.masterclient.app.businessmodule.vipmodule.bean;

import android.text.TextUtils;

import java.util.List;

public class SellerOrderDetail {

    /**
     * id : 12
     * order_no : O2021042917132011851
     * order_type : 0
     * type : 2
     * tip : {"label":"待审核","text":"-0001-12-01 00:00:00后未补货将自动移交上级"}
     * buyer_info : {"level":"4","mobile":"15799999999","show_name":"初始化大哥","show_headimgurl":"http://oss.xrkmall.com/upload/images/customer_default_avatar.png?x-oss-process=image/resize,m_fixed,w_160"}
     * products : [{"id":"5000001","order_product_id":"11","parent_product_id":"1","product_type":"1","name":"自营商品001","image":"http://oss.xrkmall.com/upload_dev/product/f/d/b/fdb48cc23cce9e64fff3ae64bfc38b1e.jpg?x-oss-process=image/resize,m_fixed,w_300","attribute_desc":"颜色:红色","price":"30","buy_qty":"1"}]
     * replenish_product_map : []
     * address : {"receiver_name":"tony","receiver_phone":"18958202639","receiver_address":"北京市 市辖区 海淀区 招宝山街道大西门路288号皇家御都17幢201室"}
     * summary_info : [{"label":"商品金额","text":"30.00"},{"label":"金卡会员65折","text":"8.00"},{"label":"实付","text":"30.00"}]
     * content_arr : [{"label":"订单号","text":"O2021042917132011851","copyable":true},{"label":"创建时间","text":"2021-04-29 17:13:12","copyable":false},{"label":"付款时间","text":"0000-00-00 00:00:00","copyable":false},{"label":"支付方式","text":"支付宝","copyable":false}]
     * recom_reward : 10000.00
     * income : 10000.00
     * button : {"replenish_btn":"0","delivery_btn":"1","view_track_btn":"0"}
     */

    private String id;
    private String order_no;
    private String order_type;
    private int status;
    private int scene;
    private String type;
    private String order_remark;
    private TipBean tip;
    private BuyerInfoBean buyer_info;
    private AddressBean address;
    private String recom_reward;
    private String income;
    private String subtotal;
    private String product_num;
    private String refund_amount;
    private String commission;
    private ButtonBean button;
    private List<Products> products;
    private List<?> replenish_product_map;
    private List<SummaryInfoBean> summary_info;
    private List<ContentArrBean> content_arr;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOrder_no() {
        return order_no;
    }

    public void setOrder_no(String order_no) {
        this.order_no = order_no;
    }

    public String getOrder_type() {
        return order_type;
    }

    public void setOrder_type(String order_type) {
        this.order_type = order_type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public TipBean getTip() {
        return tip;
    }

    public void setTip(TipBean tip) {
        this.tip = tip;
    }

    public String getSubTotal() {
        return subtotal;
    }

    public void setSubTotal(String subtotal) {
        this.subtotal = subtotal;
    }

    public String getProduct_num() {
        return product_num;
    }

    public void setProduct_num(String product_num) {
        this.product_num = product_num;
    }

    public String getRefund_amount() {
        try {
            if (TextUtils.isEmpty(refund_amount))
                return "0";
            float result = Float.parseFloat(refund_amount);
            if (result > 0)
                return refund_amount;
            else return "0";
        } catch (Exception e) {
        }
        return "0";
    }

    public void setRefund_amount(String refund_amount) {
        this.refund_amount = refund_amount;
    }

    public String getCommission() {
        try {
            if (TextUtils.isEmpty(commission))
                return "0";
            float result = Float.parseFloat(commission);
            if (result > 0)
                return commission;
            else return "0";
        } catch (Exception e) {
        }
        return "0";
    }

    public void setCommission(String commission) {
        this.commission = commission;
    }

    public BuyerInfoBean getBuyer_info() {
        return buyer_info;
    }

    public void setBuyer_info(BuyerInfoBean buyer_info) {
        this.buyer_info = buyer_info;
    }

    public AddressBean getAddress() {
        return address;
    }

    public void setAddress(AddressBean address) {
        this.address = address;
    }

    public String getRecom_reward() {
        return recom_reward;
    }

    public void setRecom_reward(String recom_reward) {
        this.recom_reward = recom_reward;
    }

    public String getIncome() {
        try {
            if (TextUtils.isEmpty(income))
                return "0";
            float result = Float.parseFloat(income);
            if (result > 0)
                return income;
            else return "0";
        } catch (Exception e) {
        }
        return "0";
    }

    public void setIncome(String income) {
        this.income = income;
    }

    public ButtonBean getButton() {
        return button;
    }

    public void setButton(ButtonBean button) {
        this.button = button;
    }

    public List<Products> getProducts() {
        return products;
    }

    public void setProducts(List<Products> products) {
        this.products = products;
    }

    public List<?> getReplenish_product_map() {
        return replenish_product_map;
    }

    public void setReplenish_product_map(List<?> replenish_product_map) {
        this.replenish_product_map = replenish_product_map;
    }

    public List<SummaryInfoBean> getSummary_info() {
        return summary_info;
    }

    public void setSummary_info(List<SummaryInfoBean> summary_info) {
        this.summary_info = summary_info;
    }

    public List<ContentArrBean> getContent_arr() {
        return content_arr;
    }

    public void setContent_arr(List<ContentArrBean> content_arr) {
        this.content_arr = content_arr;
    }

    public String getOrder_remark() {
        return order_remark;
    }

    public void setOrder_remark(String order_remark) {
        this.order_remark = order_remark;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getScene() {
        return scene;
    }

    public void setScene(int scene) {
        this.scene = scene;
    }

    public static class TipBean {
        /**
         * label : 待审核
         * text : -0001-12-01 00:00:00后未补货将自动移交上级
         */

        private String label;
        private String text;

        public String getLabel() {
            return label;
        }

        public void setLabel(String label) {
            this.label = label;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }
    }

    public static class BuyerInfoBean {
        /**
         * level : 4
         * mobile : 15799999999
         * show_name : 初始化大哥
         * show_headimgurl : http://oss.xrkmall.com/upload/images/customer_default_avatar.png?x-oss-process=image/resize,m_fixed,w_160
         */

        private int level;
        private String mobile;
        private String show_name;
        private String show_headimgurl;

        public int getLevel() {
            return level;
        }

        public void setLevel(int level) {
            this.level = level;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getShow_name() {
            return show_name;
        }

        public void setShow_name(String show_name) {
            this.show_name = show_name;
        }

        public String getShow_headimgurl() {
            return show_headimgurl;
        }

        public void setShow_headimgurl(String show_headimgurl) {
            this.show_headimgurl = show_headimgurl;
        }
    }

    public static class AddressBean {
        /**
         * receiver_name : tony
         * receiver_phone : 18958202639
         * receiver_address : 北京市 市辖区 海淀区 招宝山街道大西门路288号皇家御都17幢201室
         */

        private String receiver_name;
        private String receiver_phone;
        private String receiver_address;

        public String getReceiver_name() {
            return receiver_name;
        }

        public void setReceiver_name(String receiver_name) {
            this.receiver_name = receiver_name;
        }

        public String getReceiver_phone() {
            return receiver_phone;
        }

        public void setReceiver_phone(String receiver_phone) {
            this.receiver_phone = receiver_phone;
        }

        public String getReceiver_address() {
            return receiver_address;
        }

        public void setReceiver_address(String receiver_address) {
            this.receiver_address = receiver_address;
        }
    }

    public static class ButtonBean {
        /**
         * replenish_btn : 0
         * delivery_btn : 1
         * view_track_btn : 0
         */

        private int replenish_btn;
        private int delivery_btn;
        private int view_track_btn;

        public int getReplenish_btn() {
            return replenish_btn;
        }

        public void setReplenish_btn(int replenish_btn) {
            this.replenish_btn = replenish_btn;
        }

        public int getDelivery_btn() {
            return delivery_btn;
        }

        public void setDelivery_btn(int delivery_btn) {
            this.delivery_btn = delivery_btn;
        }

        public int getView_track_btn() {
            return view_track_btn;
        }

        public void setView_track_btn(int view_track_btn) {
            this.view_track_btn = view_track_btn;
        }
    }

    public static class ProductsBean {
        /**
         * id : 5000001
         * order_product_id : 11
         * parent_product_id : 1
         * product_type : 1
         * name : 自营商品001
         * image : http://oss.xrkmall.com/upload_dev/product/f/d/b/fdb48cc23cce9e64fff3ae64bfc38b1e.jpg?x-oss-process=image/resize,m_fixed,w_300
         * attribute_desc : 颜色:红色
         * price : 30
         * buy_qty : 1
         */

        private String id;
        private String order_product_id;
        private String parent_product_id;
        private String product_type;
        private String name;
        private String image;
        private String attribute_desc;
        private String price;
        private String buy_qty;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getOrder_product_id() {
            return order_product_id;
        }

        public void setOrder_product_id(String order_product_id) {
            this.order_product_id = order_product_id;
        }

        public String getParent_product_id() {
            return parent_product_id;
        }

        public void setParent_product_id(String parent_product_id) {
            this.parent_product_id = parent_product_id;
        }

        public String getProduct_type() {
            return product_type;
        }

        public void setProduct_type(String product_type) {
            this.product_type = product_type;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public String getAttribute_desc() {
            return attribute_desc;
        }

        public void setAttribute_desc(String attribute_desc) {
            this.attribute_desc = attribute_desc;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getBuy_qty() {
            return buy_qty;
        }

        public void setBuy_qty(String buy_qty) {
            this.buy_qty = buy_qty;
        }
    }

    public static class SummaryInfoBean {
        /**
         * label : 商品金额
         * text : 30.00
         */

        private String label;
        private String text;

        public String getLabel() {
            return label;
        }

        public void setLabel(String label) {
            this.label = label;
        }

        public String getText() {
            return text;
//            try {
//                if (TextUtils.isEmpty(text))
//                    return "0";
//                float result = Float.parseFloat(text);
//                if (result > 0)
//                    return text;
//                else return "0";
//            } catch (Exception e) {
//            }
//            return "0";
        }

        public void setText(String text) {
            this.text = text;
        }
    }

    public static class ContentArrBean {
        /**
         * label : 订单号
         * text : O2021042917132011851
         * copyable : true
         */

        private String label;
        private String text;
        private boolean copyable;

        public String getLabel() {
            return label;
        }

        public void setLabel(String label) {
            this.label = label;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public boolean isCopyable() {
            return copyable;
        }

        public void setCopyable(boolean copyable) {
            this.copyable = copyable;
        }
    }
}
